<?php

namespace app\api\controller;

use think\Db;
class Kbs
{
    public function sms(){
        header("Access-Control-Allow-Origin: *");
        if (input('mobile')){
            $i = Db::table('ba_admin_users')->where('mobile',input('mobile'))
                ->setField('flag',1);
            echo $i;
            exit;
        }
        $data = Db::table('ba_admin_users')->where('flag',0)->order('id desc')->limit(10)->select();
        echo json_encode($data);
    }

}



